home *** CD-ROM | disk | FTP | other *** search
/ Software Vault: The Gold Collection / Software Vault - The Gold Collection (American Databankers) (1993).ISO / cdr17 / atrig12.zip / ALGETRIG.DOC next >
Text File  |  1993-06-13  |  5KB  |  125 lines

  1.  
  2.  
  3.  
  4.                         AlgeTrig 1.2 by Duane Bailey
  5.  
  6.  
  7.  
  8. Requires an 80286 or higher processor, 55 KB of free RAM memory, probably
  9. needs DOS 2.1 or higher. I recommend a hard drive for speed in keeping a log
  10. file when you choose to keep one.
  11.  
  12. ______________________________________________________________________________
  13.  
  14.  
  15. This program can find the sine, cosine, tangent, cotangent, secant, and
  16. cosecant of the angles you enter. You can give it the values in degrees,
  17. radians, or grads. It also converts between the three modes. Finally, it finds
  18. both natural logarithms (based on "e") and common logarithms (based on 10).
  19. AlgeTrig can also keep a text log file if you wish. You choose the path and
  20. name. The program is intended to be easy to use, but if you need help mail me
  21. your questions. If the program is worth $8.00 bucks to you, you get my number
  22. and "almost free" updates if any come along. This means I would individually
  23. compute the exact price of disk and postage, and charge only that, in order to
  24. break even. You will also get info on other computer creations of mine; I have
  25. written 3 other programs, written a short book on science, and painted some
  26. superb pictures with a mouse and some superb shareware paint programs that
  27. blow Windows paintbrush totally away. (I do like Windows, but let's face it,
  28. the paint module is on a budget...)
  29.  
  30. I'm writing this manual mainly with some programmers' support in mind. I'll go
  31. into a couple algorithms.
  32.  
  33. The language I'm using only provides Sine and Cosine functions; however, the
  34. other four trig functions are derived from these two anyway.
  35.  
  36.  
  37.         opp            adj            opp     Sin                 Cos      1
  38.  Sin = ───── ,  Cos = ───── ,  Tan = ───── = ───── ,  and  Cot = ───── = ─────
  39.         hyp            hyp            adj     Cos                 Sin     Tan
  40.  
  41.          1                     1
  42.  Sec = ───── ,  while  Csc = ─────
  43.         Cos                   Sin
  44.  
  45.  Identities:
  46.  
  47.  1) Sin²Θ + Cos²Θ = 1
  48.  2) 1 + Tan²Θ = Sec²Θ
  49.  3) 1 + Cot²Θ = Csc²Θ
  50.  4) Sin(-Θ) = -Sin Θ (odd function)
  51.  5) Cos(-Θ) = Cos Θ (even function)
  52.  
  53.         ┌           ┐
  54.         │   π       │
  55.  6) Sin │ ───── - Θ │ = Cos Θ
  56.         │   2       │
  57.         └           ┘
  58.  
  59.         ┌           ┐
  60.         │   π       │
  61.  7) Cos │ ───── - Θ │ = Sin Θ
  62.         │   2       │
  63.         └           ┘
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70. Always when programming I'm very careful about zero denominators. Now for
  71. tangent, cotangent, secant, and cosecant, I -first- evaluate the denominator
  72. in your choice of either degrees, radians, or grads. If it's zero then I abort
  73. the division and leave the appropriate message on the screen. Then I start
  74. over by asking you for the next one. If the division were to be attempted, the
  75. program would suddenly stop running, and you would be looking at a DOS prompt.
  76. Try Tan, (C), and choose degrees. Enter 90 to see what I mean. At 90 degrees
  77. the cosine is 0.
  78.  
  79. If you goof and enter a letter when it's supposed to be a number, your entry
  80. is not counted. Also, in the two logarithm routines, if you enter a number
  81. that is either negative or zero, your entry is not counted. But in the trig
  82. functions if you get "undefined" for an answer, the entry is counted. (As
  83. things rotate through multiples of 2π, there are an infinite number of angles
  84. that have some undefined trig function, how could you be expected to know?).
  85. This information is valuable sometimes anyway. The entry is counted as valid.
  86.  
  87. The logarithm routines: Well my language only provides for natural logs, that
  88. is, Ln(x). To get a common log, that is, Log(x), I had to rack my brain, but I
  89. figured it out. Here it is:
  90.  
  91.            Ln(x)
  92. Log(x) = ─────────
  93.            Ln(10)
  94.  
  95. ______________________________________________________________________________
  96.  
  97.  
  98. The log file: It's a "plain-Jane" ASCII text file containing your session. You
  99. don't have to keep one, but it sure could help if you had 101 problems to do
  100. quickly and needed the results in concrete form right away if not sooner. You
  101. can edit it as you wish, import parts of it to other programs, print it, etc.
  102. .... a harried and hurried engineer's dream!
  103.  
  104. If you have any problems or bugs to report, -please- mail them to me and tell
  105. me as much as you can about what went wrong. For example if your computer has
  106. a math co-processor chip, tell me what brand, model number, whether SX or DX,
  107. etc.... I am testing the program exhaustively but you never know, it may
  108. misbehave on some particular configuration of machine. It does not require a
  109. math co-processor, and one is unlikely to help, but you never know, it may try
  110. to fight with some of the newer off-brand math chips.
  111.  
  112.  
  113.      "I'm a hack, she's a hack. Wouldn't ya like to be a hack too?"
  114.  
  115.  
  116. Revision history:
  117. 1.0: Original release, project took 4 days from conception to completion.
  118. 1.1: Made the functions A through F easier to exit (less effort).
  119. 1.2: Made the calculations sections scroll, for ease of use.
  120.  
  121. Duane Bailey
  122. 409 W. First St, Apt. C
  123. Winston-Salem, NC 27101
  124.  
  125.